package com.dq.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: Dang Qi
 * @Date: 2021/5/9 9:17
 * @Description:
 */
@Repository
public interface QQFriendMapper {
    @Insert("insert into qq_friend_list(qq_number, friend_number) values(#{qqNumber}, #{friendNumber})")
    int insert(String qqNumber, String friendNumber);

    @Delete("delete from qq_friend_list where qq_number=#{qqNumber} and friend_number=#{friendNumber}")
    int delete(String qqNumber, String friendNumber);

    @Select("select friend_number from qq_friend_list where qq_number=#{qqNumber}")
    List<String> getFriend(String qqNumber);
}
